#include "cart.h"
#include <QPixmap>

Cart::Cart(QPoint p)
{
    topLeft=p;
}

QSize Cart::getSize()
{
    return cartSize;
}

const QImage &Cart::getImage()
{
    static const QImage image=QImage(imagesDirectory+"Ro.png","PNG").scaled(cartSize.width(),cartSize.height());
    return image;
}

int Cart::getType()
{
    return CART;
}


QRegion Cart::getRegion()
{
    static const QBitmap bm=QBitmap::fromImage(QImage(imagesDirectory+"Ro.bmp","BMP").scaled(cartSize.width(),cartSize.height()),Qt::MonoOnly);
    static const QRegion region(bm);
    return region.translated(topLeft);
}
